package com.example.service.impl;

import com.example.entity.Homework;
import com.example.mapper.HomeworkMapper;
import com.example.service.IHomeworkService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 陈昌吉
 * @since 2024-04-16
 */
@Service
public class HomeworkServiceImpl extends ServiceImpl<HomeworkMapper, Homework> implements IHomeworkService {

    @Autowired
    private HomeworkMapper homeworkMapper;

    public List<Homework> getHomeWork() {
        List<Homework> homework=homeworkMapper.getWork();
        System.out.println(homework);
        return homework;
    }


    @Override
    public List<Homework> addHomework(Homework homework) {
        homeworkMapper.add(homework);
        return null;
    }
}
